package cn.tsoft.taobao.ui;

import cn.tsoft.taobao.util.ImageDownloader;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;

public class ItemDetailInfoPic extends Activity {
	
	private  ImageDownloader imageDownloader ;
	
	private ImageView item_detail_pic;
	private LinearLayout goback;
	@Override
	protected void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		setContentView(R.layout.item_detail_pic);
		imageDownloader = new ImageDownloader();
		/**
		 * 设置一下底部菜单烂的点击事件和显示的改变
		 */
		goback = (LinearLayout) findViewById(R.id.goback);
		goback.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				goback.setBackgroundResource(R.drawable.footbg);
				// return to previous Activity
				finish();
			}
		});
		Intent intent = getIntent();
		String imageUrl = intent.getStringExtra("pic_url");
		item_detail_pic = (ImageView)findViewById(R.id.item_detail_pic);
		imageDownloader.download(imageUrl,  item_detail_pic);
	}
}
